home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / RCS_56.ARJ / CONF.HEG < prev    next >
Text File  |  1992-02-11  |  15KB  |  496 lines

  1. /* example RCS compile-time configuration */
  2.  
  3.     /* $Id: conf.heg,v 1.8 1991/11/20 18:21:09 eggert Exp $ */
  4.  
  5. /*
  6.  * This example RCS compile-time configuration describes a host that conforms
  7.  * to Standard C (1990) and Posix 1003.1-1990 and has GNU diff.
  8.  * If you can't get conf.sh to work as described in the Makefile,
  9.  * copy this file to conf.h and edit conf.h by hand; see README.
  10.  */
  11.  
  12. #define exitmain(n) return n /* how to exit from main() */
  13. /* #define _POSIX_SOURCE */ /* Define this if Posix + strict Standard C.  */
  14.  
  15. #include <errno.h>
  16. #include <stdio.h>
  17. #include <time.h>
  18.  
  19. /* Comment out #include lines below that do not work.  */
  20. #include <sys/types.h>
  21. #include <sys/stat.h>
  22. #include <dirent.h>
  23. #include <fcntl.h>
  24. #include <limits.h>
  25. #include <pwd.h>
  26. #include <signal.h>
  27. #include <stdlib.h>
  28. #include <string.h>
  29. /* #include <sys/mman.h> */
  30. #include <sys/wait.h>
  31. #include <unistd.h>
  32. #include <utime.h>
  33. /* #include <vfork.h> */
  34.  
  35. /* Define the following symbols to be 1 or 0.  */
  36. #define has_sys_dir_h 0 /* Does #include <sys/dir.h> work?  */
  37. #define has_sys_param_h 0 /* Does #include <sys/param.h> work?  */
  38. #define has_readlink 0 /* Does readlink() work?  */
  39.  
  40. /* #undef NAME_MAX */ /* Uncomment this if NAME_MAX is broken.  */
  41.  
  42. #if !defined(NAME_MAX) && !defined(_POSIX_NAME_MAX)
  43. #    if has_sys_dir_h
  44. #        include <sys/dir.h>
  45. #    endif
  46. #    ifndef NAME_MAX
  47. #        ifndef MAXNAMLEN
  48. #            define MAXNAMLEN 14
  49. #        endif
  50. #        define NAME_MAX MAXNAMLEN
  51. #    endif
  52. #endif
  53. #if !defined(PATH_MAX) && !defined(_POSIX_PATH_MAX)
  54. #    if has_sys_param_h
  55. #        include <sys/param.h>
  56. #        define included_sys_param_h 1
  57. #    endif
  58. #    ifndef PATH_MAX
  59. #        ifndef MAXPATHLEN
  60. #            define MAXPATHLEN 1024
  61. #        endif
  62. #        define PATH_MAX (MAXPATHLEN-1)
  63. #    endif
  64. #endif
  65. #if has_readlink && !defined(MAXSYMLINKS)
  66. #    if has_sys_param_h && !included_sys_param_h
  67. #        include <sys/param.h>
  68. #    endif
  69. #    ifndef MAXSYMLINKS
  70. #        define MAXSYMLINKS 20 /* BSD; not standard yet */
  71. #    endif
  72. #endif
  73.  
  74. /* Comment out the keyword definitions below if the keywords work.  */
  75. /* #define const */
  76. /* #define volatile */
  77.  
  78. /* Comment out the typedefs below if the types are already declared.  */
  79. /* Fix any uncommented typedefs that are wrong.  */
  80. /* typedef int mode_t; */
  81. /* typedef int pid_t; */
  82. /* typedef int sig_atomic_t; */
  83. /* typedef unsigned size_t; */
  84. /* typedef int ssize_t; */
  85. /* typedef long time_t; */
  86. /* typedef int uid_t; */
  87.  
  88. /* Define the following symbols to be 1 or 0.  */
  89. #define has_prototypes 1 /* Do function prototypes work?  */
  90. #define has_stdarg 1 /* Does <stdarg.h> work?  */
  91. #define has_varargs 0 /* Does <varargs.h> work?  */
  92. #define va_start_args 2 /* How many args does va_start() take?  */
  93. #if has_prototypes
  94. #    define P(params) params
  95. #else
  96. #    define P(params) ()
  97. #endif
  98. #if has_stdarg
  99. #    include <stdarg.h>
  100. #else
  101. #    if has_varargs
  102. #        include <varargs.h>
  103. #    else
  104.         typedef char *va_list;
  105. #        define va_dcl int va_alist;
  106. #        define va_start(ap) ((ap) = (va_list)&va_alist)
  107. #        define va_arg(ap,t) (((t*) ((ap)+=sizeof(t)))  [-1])
  108. #        define va_end(ap)
  109. #    endif
  110. #endif
  111. #if va_start_args == 2
  112. #    define vararg_start va_start
  113. #else
  114. #    define vararg_start(ap,p) va_start(ap)
  115. #endif
  116.  
  117. #define text_equals_binary_stdio 1 /* Does stdio treat text like binary?  */
  118. #define text_work_stdio 0 /* Text i/o for working file, binary for RCS file?  */
  119. #if text_equals_binary_stdio
  120.     /* Text and binary i/o behave the same, or binary i/o does not work.  */
  121. #    define FOPEN_R "r"
  122. #    define FOPEN_W "w"
  123. #    define FOPEN_WPLUS "w+"
  124. #else
  125.     /* Text and binary i/o behave differently.  */
  126.     /* This is incompatible with Posix and Unix.  */
  127. #    define FOPEN_R "rb"
  128. #    define FOPEN_W "wb"
  129. #    define FOPEN_WPLUS "w+b"
  130. #endif
  131. #if text_work_stdio
  132. #    define FOPEN_R_WORK "r"
  133. #    define FOPEN_W_WORK "w"
  134. #    define FOPEN_WPLUS_WORK "w+"
  135. #else
  136. #    define FOPEN_R_WORK FOPEN_R
  137. #    define FOPEN_W_WORK FOPEN_W
  138. #    define FOPEN_WPLUS_WORK FOPEN_WPLUS
  139. #endif
  140.  
  141. /* Define or comment out the following symbols as needed.  */
  142. #define bad_fopen_wplus 0 /* Does fopen(f,FOPEN_WPLUS) fail to truncate f?  */
  143. #define getlogin_is_secure 0 /* Is getlogin() secure?  Usually it's not.  */
  144. #define has_dirent 1 /* Do opendir(), readdir(), closedir() work?  */
  145. #define has_fchmod 0 /* Does fchmod() work?  */
  146. #define has_fputs 1 /* Does fputs() work?  */
  147. #define has_ftruncate 0 /* Does ftruncate() work?  */
  148. #define has_getuid 1 /* Does getuid() work?  */
  149. #define has_getpwuid 1 /* Does getpwuid() work?  */
  150. #define has_link 1 /* Does link() work?  */
  151. #define has_memcmp 1 /* Does memcmp() work?  */
  152. #define has_memcpy 1 /* Does memcpy() work?  */
  153. #define has_memmove 1 /* Does memmove() work?  */
  154. #define has_madvise 0 /* Does madvise() work?  */
  155. #define has_mmap 0 /* Does mmap() work on regular files?  */
  156. #define has_rename 1 /* Does rename() work?  */
  157. #define bad_a_rename 0 /* Does rename(A,B) fail if A is unwritable?  */
  158. #define bad_b_rename 0 /* Does rename(A,B) fail if B is unwritable?  */
  159. #define VOID (void) /* 'VOID e;' discards the value of an expression 'e'.  */
  160. #define has_seteuid 0 /* Does seteuid() work?  See README.  */
  161. #define has_setuid 1 /* Does setuid() exist?  */
  162. #define has_signal 1 /* Does signal() work?  */
  163. #define signal_args P((int)) /* arguments of signal handlers */
  164. #define signal_type void /* type returned by signal handlers */
  165. #define sig_zaps_handler 0 /* Must a signal handler reinvoke signal()?  */
  166. #define has_sigaction 1 /* Does struct sigaction work?  */
  167. #define has_sigblock 0 /* Does sigblock() work?  */
  168. /* #define sigmask(s) (1 << ((s)-1)) */ /* Yield mask for signal number.  */
  169. #define has_sys_siglist 0 /* Does sys_siglist[] work?  */
  170. typedef ssize_t fread_type; /* type returned by fread() and fwrite() */
  171. typedef size_t freadarg_type; /* type of their size arguments */
  172. typedef void *malloc_type; /* type returned by malloc() */
  173. #define has_getcwd 1 /* Does getcwd() work?  */
  174. #define has_getwd 0 /* Does getwd() work?  */
  175. #define has_mktemp 0 /* Does mktemp() work?  */
  176. #define has_NFS 0 /* Might NFS be used?  */
  177. /* #define strchr index */ /* Use old-fashioned name for strchr()?  */
  178. /* #define strrchr rindex */ /* Use old-fashioned name for strrchr()?  */
  179. #define bad_unlink 0 /* Does unlink() fail on unwritable files?  */
  180. #define has_vfork 0 /* Does vfork() work?  */
  181. #define has_fork 1 /* Does fork() work?  */
  182. #define has_spawn 0 /* Does spawn*() work?  */
  183. #define has_wait 1 /* Does wait() work?  */
  184. #define has_waitpid 1 /* Does waitpid() work?  */
  185. #define RCS_SHELL "/bin/sh" /* shell to run RCS subprograms */
  186. #define has_vfprintf 1 /* Does vfprintf() work?  */
  187. #define has__doprintf 0 /* Does _doprintf() work?  */
  188. #define has__doprnt 0 /* Does _doprnt() work?  */
  189. /* #undef EXIT_FAILURE */ /* Uncomment this if EXIT_FAILURE is broken.  */
  190. #define large_memory 0 /* Can main memory hold entire RCS files?  */
  191. /* #undef ULONG_MAX */ /* Uncomment this if ULONG_MAX is broken (e.g. < 0).  */
  192. /* struct utimbuf { time_t actime, modtime; }; */ /* Uncomment this if needed.  */
  193. #define CO "/usr/local/bin/co" /* name of 'co' program */
  194. #define COMPAT2 0 /* Are version 2 files supported?  */
  195. #define DATEFORM "%.2d.%.2d.%.2d.%.2d.%.2d.%.2d" /* e.g. 01.01.01.01.01.01 */
  196. #define DIFF "/usr/local/bin/diff" /* name of 'diff' program */
  197. #define DIFF3 "/usr/local/bin/diff3" /* name of 'diff3' program */
  198. #define DIFF3_BIN 1 /* Is diff3 user-visible (not the /usr/lib auxiliary)?  */
  199. #define DIFF_FLAGS , "-an" /* Make diff output suitable for RCS.  */
  200. #define DIFF_L 1 /* Does diff -L work? */
  201. #define DIFF_SUCCESS 0 /* DIFF status if no differences are found */
  202. #define DIFF_FAILURE 1 /* DIFF status if differences are found */
  203. #define DIFF_TROUBLE 2 /* DIFF status if trouble */
  204. #define ED "/bin/ed" /* name of 'ed' program (used only if !DIFF3_BIN) */
  205. #define MERGE "/usr/local/bin/merge" /* name of 'merge' program */
  206. #define TMPDIR "/tmp" /* default directory for temporary files */
  207. #define SLASH '/' /* principal pathname separator */
  208. #define SLASHes '/' /* `case SLASHes:' labels all pathname separators */
  209. #define isSLASH(c) ((c) == SLASH) /* Is arg a pathname separator?  */
  210. #define ROOTPATH(p) isSLASH((p)[0]) /* Is p an absolute pathname?  */
  211. #define X_DEFAULT ",v/" /* default value for -x option */
  212. #define DIFF_ABSOLUTE 1 /* Is ROOTPATH(DIFF) true?  */
  213. #define ALL_ABSOLUTE 1 /* Are all subprograms absolute pathnames?  */
  214. #define SENDMAIL "/bin/mail" /* how to send mail */
  215. #define TZ_must_be_set 0 /* Must TZ be set for gmtime() to work?  */
  216.  
  217.  
  218.  
  219. /* Adjust the following declarations as needed.  */
  220.  
  221.  
  222. #if __GNUC__ && !__STRICT_ANSI__
  223. #    define exiting volatile /* GCC extension: function cannot return */
  224. #else
  225. #    define exiting
  226. #endif
  227.  
  228. #if has_ftruncate
  229.     int ftruncate P((int,off_t));
  230. #endif
  231.  
  232. /* <sys/mman.h> */
  233. #if has_madvise
  234.     int madvise P((caddr_t,size_t,int));
  235. #endif
  236. #if has_mmap
  237.     caddr_t mmap P((caddr_t,size_t,int,int,int,off_t));
  238.     int munmap P((caddr_t,size_t));
  239. #endif
  240.  
  241.  
  242. /* Posix (ISO/IEC 9945-1: 1990 / IEEE Std 1003.1-1990) */
  243. /* These definitions are for the benefit of non-Posix hosts, and */
  244. /* Posix hosts that have Standard C compilers but traditional include files.  */
  245. /* Unfortunately, mixed-up hosts are all too common.  */
  246.  
  247. /* <fcntl.h> */
  248. #ifdef F_DUPFD
  249.     int fcntl P((int,int,...));
  250. #else
  251.     int dup2 P((int,int));
  252. #endif
  253. #ifndef O_BINARY /* some non-Posix hosts need O_BINARY */
  254. #    define O_BINARY 0 /* no effect on Posix */
  255. #endif
  256. #ifdef O_CREAT
  257. #    define open_can_creat 1
  258. #else
  259. #    define open_can_creat 0
  260. #    define O_RDONLY 0
  261. #    define O_WRONLY 1
  262. #    define O_RDWR 2
  263. #    define O_CREAT 01000
  264. #    define O_TRUNC 02000
  265.     int creat P((char const*,mode_t));
  266. #endif
  267. #ifndef O_EXCL
  268. #    define O_EXCL 0
  269. #endif
  270.  
  271. /* <pwd.h> */
  272. #if has_getpwuid
  273.     struct passwd *getpwuid P((uid_t));
  274. #endif
  275.  
  276. /* <signal.h> */
  277. #if has_sigaction
  278.     int sigaction P((int,struct sigaction const*,struct sigaction*));
  279.     int sigaddset P((sigset_t*,int));
  280.     int sigemptyset P((sigset_t*));
  281. #else
  282. #if has_sigblock
  283.     /* BSD */
  284.     int sigblock P((int));
  285.     int sigmask P((int));
  286.     int sigsetmask P((int));
  287. #endif
  288. #endif
  289.  
  290. /* <stdio.h> */
  291. FILE *fdopen P((int,char const*));
  292. int fileno P((FILE*));
  293.  
  294. /* <sys/stat.h> */
  295. int chmod P((char const*,mode_t));
  296. int fstat P((int,struct stat*));
  297. int stat P((char const*,struct stat*));
  298. mode_t umask P((mode_t));
  299. #if has_fchmod
  300.     int fchmod P((int,mode_t));
  301. #endif
  302. #ifndef S_IRUSR
  303. #    ifdef S_IREAD
  304. #        define S_IRUSR S_IREAD
  305. #    else
  306. #        define S_IRUSR 0400
  307. #    endif
  308. #    ifdef S_IWRITE
  309. #        define S_IWUSR S_IWRITE
  310. #    else
  311. #        define S_IWUSR (S_IRUSR/2)
  312. #    endif
  313. #endif
  314. #ifndef S_IRGRP
  315. #    if has_getuid
  316. #        define S_IRGRP (S_IRUSR / 0010)
  317. #        define S_IWGRP (S_IWUSR / 0010)
  318. #        define S_IROTH (S_IRUSR / 0100)
  319. #        define S_IWOTH (S_IWUSR / 0100)
  320. #    else
  321.         /* single user OS -- not Posix or Unix */
  322. #        define S_IRGRP 0
  323. #        define S_IWGRP 0
  324. #        define S_IROTH 0
  325. #        define S_IWOTH 0
  326. #    endif
  327. #endif
  328. #ifndef S_ISREG
  329. #    define S_ISREG(n) (((n) & S_IFMT) == S_IFREG)
  330. #endif
  331.  
  332. /* <sys/wait.h> */
  333. #if has_wait
  334.     pid_t wait P((int*));
  335. #endif
  336. #ifndef WEXITSTATUS
  337. #    define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  338. #    undef WIFEXITED /* Avoid 4.3BSD incompatibility with Posix.  */
  339. #endif
  340. #ifndef WIFEXITED
  341. #    define WIFEXITED(stat_val) (!((stat_val) & 255))
  342. #endif
  343.  
  344. /* <unistd.h> */
  345. char *getlogin P((void));
  346. int close P((int));
  347. int isatty P((int));
  348. int link P((char const*,char const*));
  349. int open P((char const*,int,...));
  350. int unlink P((char const*));
  351. /* int _filbuf P((FILE*)); *//* keeps lint quiet in traditional C */
  352. /* int _flsbuf P((int,FILE*)); *//* keeps lint quiet in traditional C */
  353. long pathconf P((char const*,int));
  354. ssize_t write P((int,void const*,size_t));
  355. #ifndef STDIN_FILENO
  356. #    define STDIN_FILENO 0
  357. #    define STDOUT_FILENO 1
  358. #    define STDERR_FILENO 2
  359. #endif
  360. #if has_fork
  361. #    if !has_vfork
  362. #        undef vfork
  363. #        define vfork fork
  364. #    endif
  365.     pid_t vfork P((void)); /* vfork is nonstandard but faster */
  366. #endif
  367. #if has_getcwd || !has_getwd
  368.     char *getcwd P((char*,size_t));
  369. #else
  370.     char *getwd P((char*));
  371. #endif
  372. #if has_getuid
  373.     uid_t getuid P((void));
  374. #endif
  375. #if has_readlink
  376.     ssize_t readlink P((char const*,char*,size_t)); /* BSD; not standard yet */
  377. #endif
  378. #if has_setuid
  379. #    if !has_seteuid
  380. #        undef seteuid
  381. #        define seteuid setuid
  382. #    endif
  383.     int seteuid P((uid_t));
  384.     uid_t geteuid P((void));
  385. #endif
  386. #if has_spawn
  387.     int spawnv P((int,char const*,char*const*));
  388. #    if ALL_ABSOLUTE
  389. #        define spawn_RCS spawnv
  390. #    else
  391. #        define spawn_RCS spawnvp
  392.         int spawnvp P((int,char const*,char*const*));
  393. #    endif
  394. #else
  395.     int execv P((char const*,char*const*));
  396. #    if ALL_ABSOLUTE
  397. #        define exec_RCS execv
  398. #    else
  399. #        define exec_RCS execvp
  400.         int execvp P((char const*,char*const*));
  401. #    endif
  402. #endif
  403.  
  404. /* utime.h */
  405. int utime P((char const*,struct utimbuf const*));
  406.  
  407.  
  408. /* Standard C library */
  409. /* These definitions are for the benefit of hosts that have */
  410. /* traditional C include files, possibly with Standard C compilers.  */
  411. /* Unfortunately, mixed-up hosts are all too common.  */
  412.  
  413. /* <errno.h> */
  414. extern int errno;
  415.  
  416. /* <limits.h> */
  417. #ifndef ULONG_MAX
  418.     /* This does not work in #ifs, but it's good enough for us.  */
  419. #    define ULONG_MAX ((unsigned long)-1)
  420. #endif
  421.  
  422. /* <signal.h> */
  423. #if has_signal
  424.     signal_type (*signal P((int,signal_type(*)signal_args)))signal_args;
  425. #endif
  426.  
  427. /* <stdio.h> */
  428. FILE *fopen P((char const*,char const*));
  429. fread_type fread P((void*,freadarg_type,freadarg_type,FILE*));
  430. fread_type fwrite P((void const*,freadarg_type,freadarg_type,FILE*));
  431. int fclose P((FILE*));
  432. int feof P((FILE*));
  433. int ferror P((FILE*));
  434. int fflush P((FILE*));
  435. int fprintf P((FILE*,char const*,...));
  436. int fputs P((char const*,FILE*));
  437. int fseek P((FILE*,long,int));
  438. int printf P((char const*,...));
  439. int rename P((char const*,char const*));
  440. int sprintf P((char*,char const*,...));
  441. long ftell P((FILE*));
  442. void clearerr P((FILE*));
  443. void perror P((char const*));
  444. #ifndef L_tmpnam
  445. #    define L_tmpnam 32 /* power of 2 > sizeof("/usr/tmp/xxxxxxxxxxxxxxx") */
  446. #endif
  447. #ifndef SEEK_SET
  448. #    define SEEK_SET 0
  449. #endif
  450. #if has_mktemp
  451.     char *mktemp P((char*)); /* traditional */
  452. #else
  453.     char *tmpnam P((char*));
  454. #endif
  455. #if has_vfprintf
  456.     int vfprintf P((FILE*,char const*,va_list));
  457. #else
  458. #if has__doprintf
  459.     void _doprintf P((FILE*,char const*,va_list)); /* Minix */
  460. #else
  461.     void _doprnt P((char const*,va_list,FILE*)); /* BSD */
  462. #endif
  463. #endif
  464.  
  465. /* <stdlib.h> */
  466. char *getenv P((char const*));
  467. exiting void _exit P((int));
  468. exiting void exit P((int));
  469. malloc_type malloc P((size_t));
  470. malloc_type realloc P((malloc_type,size_t));
  471. void free P((malloc_type));
  472. #ifndef EXIT_FAILURE
  473. #    define EXIT_FAILURE 1
  474. #endif
  475. #ifndef EXIT_SUCCESS
  476. #    define EXIT_SUCCESS 0
  477. #endif
  478. #if !has_fork && !has_spawn
  479.     int system P((char const*));
  480. #endif
  481.  
  482. /* <string.h> */
  483. char *strcpy P((char*,char const*));
  484. char *strchr P((char const*,int));
  485. char *strrchr P((char const*,int));
  486. int memcmp P((void const*,void const*,size_t));
  487. int strcmp P((char const*,char const*));
  488. size_t strlen P((char const*));
  489. void *memcpy P((void*,void const*,size_t));
  490. #if has_memmove
  491.     void *memmove P((void*,void const*,size_t));
  492. #endif
  493.  
  494. /* <time.h> */
  495. time_t time P((time_t*));
  496.